package com.atjg.autocat.callback;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;


import com.zhy.http.okhttp.callback.Callback;

import okhttp3.Response;

public abstract class MyBitmapCallbak extends Callback<Bitmap> {

    @Override
    public Bitmap parseNetworkResponse(Response response, int id) throws Exception {
        BitmapFactory.Options options2 = new BitmapFactory.Options();
        options2.inSampleSize = 2;
        options2.inPreferredConfig = Bitmap.Config.RGB_565;
        assert response.body() != null;
        return BitmapFactory.decodeStream(response.body().byteStream(),null,options2);

    }

}
